package com.ssh.dao;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.ssh.model.AutoInfo;
import com.ssh.model.ResourceInfo;

public class ResourceInfoDAO extends HibernateDaoSupport implements IResourceInfoDAO{

	@Override
	public ResourceInfo findResourceInfoById(long id) {
		try {
			ResourceInfo instance = (ResourceInfo) getHibernateTemplate().get(
					"com.ssh.model.ResourceInfo", id);
			return instance;
		} catch (RuntimeException re) {
			
			throw re;
		}
	}

	@Override
	public void saveResourceInfo(ResourceInfo resourceInfo) {
		try {
			getHibernateTemplate().save(resourceInfo);
			
		} catch (RuntimeException re) {
		
			throw re;
		}
		
	}
   
}
